op {
  graph_op_name: "DataFormatVecPermute"
  in_arg {
    name: "x"
    description: <<END
Tensor of rank 1 or 2 in source data format.
END
  }
  out_arg {
    name: "y"
    description: <<END
Tensor of rank 1 or 2 in destination data format.
END
  }
  attr {
    name: "src_format"
    description: <<END
source data format.
END
  }
  attr {
    name: "dst_format"
    description: <<END
destination data format.
END
  }
  summary: "Permute input tensor from `src_format` to `dst_format`."
  description: <<END
Given source and destination format strings of length n=4 or 5, the input
tensor must be a vector of size n or n-2, or a 2D tensor of shape
(n, 2) or (n-2, 2).

If the first dimension of the input tensor is n-2, it is assumed that
non-spatial dimensions are omitted (i.e `N`, `C`).

For example, with `src_format` of `NHWC`, `dst_format` of `NCHW`, and input:
```
[1, 2, 3, 4]
```
, the output will be:
```
[1, 4, 2, 3]
```
With `src_format` of `NDHWC`, `dst_format` of `NCDHW`, and input:
```
[[1, 6], [2, 7], [3, 8], [4, 9], [5, 10]]
```
, the output will be:
```
[[1, 6], [5, 10], [2, 7], [3, 8], [4, 9]]
```
With `src_format` of `NHWC`, `dst_format` of `NCHW`, and input:
```
[1, 2]
```
, the output will be:
```
[1, 2]
```
END
}
